home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / source / emacs-18.59src.lha / emacs-18.59 / amiga / contrib / lindgren / sas-c-emacs.lha / slashquote / slashquote.doc < prev    next >
Encoding:
Text File  |  1993-06-10  |  1.5 KB  |  60 lines

  1.  
  2. Slashquote.library is a one-function ARexx-library used by
  3. the sas-c.el program. Add it to your system with the command:
  4.  
  5.     axlib slashquote.library -20 -30 0
  6.  
  7. Written by Anders Lindgren, d91ali@csd.uu.se
  8.  
  9.  
  10. slashquote.library/SLASHQUOTE
  11.  
  12.    NAME
  13.     SLASHQUOTE - Prefix special characters in a string.
  14.  
  15.    SYNOPSIS
  16.     str = SLASHQUOTE(str)
  17.         or
  18.     str = SLASHQUOTE(str, char)
  19.  
  20.    FUNCTION
  21.     Handles strings with should be sent through a parser by putting
  22.     a special character before any occurances of that character and
  23.     the double quote character. It then returns the string quoted.
  24.  
  25.     If no argument for the special character is given, backslash
  26.     is used.
  27.  
  28.     The function was originally written for the program Mg3a, as
  29.     a replace for a slow arexx macro by the same name. Mg3a uses
  30.     the backslash and double-quote as special characters.
  31.     It can also be used in command shells to fix arguments. Other
  32.     uses can surely be found, like passing strings to GNUEmacs.
  33.     
  34.    EXAMPLE
  35.  
  36.     arg1        arg2        returned
  37.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  38.     hello        <none>        "hello"
  39.     hel\lo        <none>        "hel\\lo"
  40.     h"el\lo        <none>        "h\"el\\lo"
  41.     h"el\lo        *        "h*"el\lo"
  42.     h"el*lo        *        "h*"el**lo"
  43.     "hi"        <none>        "\"hi\""
  44.  
  45. slashquote.library/ZERO2STR
  46.  
  47.    NAME
  48.     ZERO2STR - Convert a zeroterminated argument to a rexxstring.
  49.  
  50.    SYNOPSIS
  51.     str = ZERO2STR(pkt)
  52.         or
  53.     str = ZERO2STR(pkt, nr)
  54.  
  55.    FUNCTION
  56.     Same av GETARG, but can handle arguments which aren't RexxArg:s.
  57.  
  58.    NOTE
  59.     This is a typical example of a quick n'dirty solution.
  60.